<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<div class="top-handle">
    <div class="con" id="js_page_op_menu">
        <div class="btn-wrap" id="js_menu_btn_warp">
            <a href="javascript:;" class="btn btn-disabled"
                menu="view_photo">预览</a> <a href="javascript:;"
                class="btn btn-disabled" menu="download">地图</a>
            </div> 
            <script type="text/javascript">
                $(document).ready(function(){
                    var arr = {"download": 1, "view_music":1};
                    if(document.all){
                        arr = {"download": 1, "view_doc":1, "add_music":1};
                    }
                    var box = $("#js_menu_btn_warp");

                    var list = [];
                    for(var k in arr){
                        if(arr[k]){
                            list.push(box.find("[menu='"+k+"']"));
                        }
                    }
                    var hideTopMenuBtn = function(){
                        var w = $(document).width();
                        if(w < 900){
                            for(var i = 0, len = list.length; i < len; i++){
                                list[i].hide();
                            }
                        }
                        else{
                            for(var i = 0, len = list.length; i < len; i++){
                                list[i].show();
                            }
                        }
                    }
                    hideTopMenuBtn();
                    $(window).bind("resize", function(){hideTopMenuBtn();});
                })
            </script>



            <div class="search-box">
                <form id="js_search_file_form">
                    <label for="js_search_input">搜索文件</label> <input
                        type="text" class="text" name="search_value"
                        autocomplete="off" value="" id="js_search_input">
                    <button type="submit">
                        <i>搜索</i>
                    </button>
                </form>

                <script type="text/javascript"
                    src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/search_file.js?v=<?php echo(Yii::app()->params['app']['version'])?>"></script>
            </div>

        </div>
    </div>
    <script type="text/javascript">
    try{
        if(parent){
            parent.window.PageCTL.MarkURL(window.location.href);
        }
    }catch(e){}
</script>
<script type="text/javascript">
function SetCwinHeight(){   
    var iframeid=document.getElementById("map_frame"); //iframe id   
    if (document.getElementById){   
        if (iframeid && !window.opera){    
             if (iframeid.contentDocument && iframeid.contentDocument.body.offsetHeight){  
                 iframeid.height = $("#js_data_list").height() - 20; 
             }else if(iframeid.Document && iframeid.Document.body.scrollHeight){ 
                iframeid.height = $("#js_data_list").height() - 20; 
             }  
       } 
    }  
}
</script> 
    <div class="page-main">
            <div id="js_cantain_box" class="col-main">
                <div rel="page_local" class="path-box"></div>
                <div id="js_data_list_outer" class="list-container">
                     <div id="js_data_list" >
                        <iframe id="map_frame" onload="SetCwinHeight()"  src="<?php echo(Yii::app()->params['app']['host']); ?>/index.php?r=list/mapalbum&flag=<?php echo $flag;?><?php if ($gps){ echo "&exif=1" . "&tid=" . $tid . "&cid=" . $cid . "&version=" . $vid . "&name=" . $name . "&tpl=" . $tpl . "&gps=" . $gps;}?>" scrolling="no" frameborder="0"  width="100%"></iframe>
                    </div>    
                </div>
            </div>
            <div class="col-sub">
                <div id="js_right_side">
                <div class="file-info"><div class="file-thumb folder-location"></div><div class="thumb-name">相册地点功能</div></div><div class="sub-tips"><h3><i class="icon ico-tips"></i>小贴士</h3><ul><li>• 以地点显示相册 </li><li>• 显示相片的地理信息 </li></ul></div></div>
                <div class="sub-space" id="js_space_box" style="display: none;">
                    <i class="icon"></i><span rel="space_text"></span><span class="space-status"><i style="width: 0;" rel="space_line"></i></span>
                </div>
            </div>
        </div>
    


<?php
$navStr = "";
if(isset($nav)) {
    foreach($nav as $data) {
        $fileName = $data["fileName"];
        $id = $data["id"];
        $parent_file_id = $data["parent_file_id"];
        $navStr = $navStr . ",{\"name\":\"$fileName\",\"aid\":1,\"cid\":\"$id\",\"pid\":$parent_file_id}";
    }
}
?>

<script type="text/javascript">
var IsTempLoad = true;
var dataSource = {aid: <?php echo $aid?>, cid: <?php echo $cid;?>, order: ''};
var NoRightSide = true;
var downURI = "<?php echo(Yii::app()->params['app']['host'])?>";
var LIST_CONFIG = {
    top_tip: eval('([{"name":"<?php echo $basic["cataName"];?>","aid":<?php echo $aid;?>,"cid":"-1","pid":0}<?php echo $navStr?>])')
};
</script>